package xyz.syyrjx.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author 大地崩坏苍蝇兽
 * @date 2023/1/12 - 15:46
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SyyrjxRpcRemoteAddress implements Serializable {

    private String host;

    private int port;

    public SyyrjxRpcRemoteAddressRegistryEntity toRegistryEntity() {
        SyyrjxRpcRemoteAddressRegistryEntity entity = new SyyrjxRpcRemoteAddressRegistryEntity();
        entity.setAddress(this);
        entity.setTime(System.currentTimeMillis());
        return entity;
    }
}
